import { CreateAppBody } from '../app/api';
import { AppSchema } from '../app/type';
import { ParentIdType } from '../workflow/node';

export type GetSystemPluginTemplatesBody = {
  searchKey?: string;
  parentId: ParentIdType;
};

export type GetPreviewNodeQuery = { appId: string };

export type CreateHttpPluginBody = Omit<CreateAppBody, 'type' | 'modules' | 'edges'> & {
  intro?: string;
  pluginData: AppSchema['pluginData'];
};

export type UpdateHttpPluginBody = {
  appId: string;
  name: string;
  avatar?: string;
  intro?: string;
  pluginData: AppSchema['pluginData'];
};
